<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilsem: xsem_npi_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilsem
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xsem__npi__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xsem_npi_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file has XilSEM NPI SHA error injection example. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who   Date        Changes
</p>
<hr/>
<p>
0.1   rb    03/16/2021  Initial Creation
0.2   hb    07/20/2021  Added event notification and restructured code
0.3   hb    09/20/2021  Added description on error injection &amp;
                        correction
0.4   hb    01/06/2022  Added feature to print golden SHA values
0.5   hb    01/27/2022  Added event for NPI scan self diagnosis
0.6   hb    07/28/2022  Updated example with descriptor attribute
                        interpretation
0.7   gayu  05/19/2023  Added Test print summary and updated copyright
                        information
0.8   anv   10/18/2023  Added macro protection to Enable Error Injection
                        Feature usage and Updated to get
                        XilSEM NPI status prints
0.9   gayu  01/18/2024  Removed false else condition in main function
                        for XSem_CmdNpiGetStatus API as this is not a
                        valid case for deferred start-up.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsem__npi__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">The purpose of this function is to illustrate the usage of client APIs for NPI scan over IPI.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The purpose of this function is to illustrate the usage of client APIs for NPI scan over IPI. </p>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>
<ul>
<li>XST_SUCCESS - on successful execution of injection and detection of error</li>
<li>XST_FAILURE - on failure</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>Npi example always injects error in the golden SHA of the first descriptor. The injected SHA error can be corrected by executing the error injection sequence again. Real SHA errors are uncorrectable. </dd></dl>

<p>References <a class="el" href="xsem__client__api_8h.html#a7dcab524effe7d228464f765a3010913">CMD_ACK_NPI_ERRINJECT</a>, <a class="el" href="xsem__client__api_8h.html#aa6ca4d0571e27d9a110753dbd7fd1cdb">CMD_ACK_NPI_GET_GLDN_SHA</a>, <a class="el" href="xsem__client__api_8h.html#a2e9dbdbc39535fd7129b9001e1db1d35">CMD_ACK_NPI_STARTSCAN</a>, <a class="el" href="xsem__client__api_8h.html#a5161ee15adc2e003d38492c3ea774a7f">CMD_ACK_NPI_STOPSCAN</a>, <a class="el" href="struct_x_sem___descriptor_data.html#a2d5a9bcef8329ea2bdf6a73e223aab8e">XSem_DescriptorData::DescriptorCount</a>, <a class="el" href="struct_x_sem_npi_status.html#a0b7d87074b8e1445554c051089fb7228">XSemNpiStatus::ErrInfo</a>, <a class="el" href="struct_x_sem_npi_status.html#af831524318353b603e14fda32c75809f">XSemNpiStatus::HbCnt</a>, <a class="el" href="xsem__client__api_8h.html#af3fd0512f794e86ac22bce16c7b4a170">MAX_NPI_ERR_INFO_CNT</a>, <a class="el" href="xsem__client__api_8h.html#af9560eda50f4b3e80b3113074fb27707">MAX_NPI_SLV_SKIP_CNT</a>, <a class="el" href="struct_x_sem_ipi_resp.html#a7d7eea2dd43f003a0602eeebaf3ac85d">XSemIpiResp::RespMsg1</a>, <a class="el" href="struct_x_sem_ipi_resp.html#a1502bcdecb5e80f54fd9f283dfeb8a2c">XSemIpiResp::RespMsg2</a>, <a class="el" href="struct_x_sem_npi_status.html#af86519a71bc534fd458933dd18fa46d4">XSemNpiStatus::ScanCnt</a>, <a class="el" href="struct_x_sem_npi_status.html#ad6bb1c2e66f4523d239e18ff685a9ca9">XSemNpiStatus::SlvSkipCnt</a>, <a class="el" href="struct_x_sem_npi_status.html#a00fb9e1d6176efdd76fa98fb28e68234">XSemNpiStatus::Status</a>, <a class="el" href="xsem__npi__example__pl__mb_8c.html#a0d1727d5d5abe0b3a960bc035bc4d45e">XSem_ApiCheckScanCount()</a>, <a class="el" href="group__xsem__client__apis.html#ga90b532fd63cfdad4790f9144aaca2523">XSem_CmdNpiGetGldnSha()</a>, <a class="el" href="group__xsem__client__apis.html#ga81a2507bb54e6b6e8b28399c4196876a">XSem_CmdNpiGetStatus()</a>, <a class="el" href="group__xsem__client__apis.html#gae1747f42d213d24731e0004b1a47e99b">XSem_CmdNpiInjectError()</a>, <a class="el" href="group__xsem__client__apis.html#gac7eac8a55d819df4d84df2c48d95e5d6">XSem_CmdNpiStartScan()</a>, <a class="el" href="group__xsem__client__apis.html#gacabf49b2dbc63f0d9e960b32de5594d6">XSem_CmdNpiStopScan()</a>, and <a class="el" href="xsem__npi__example__pl__mb_8c.html#ad815d14892da5f95a002dea17c44cb4b">XSem_NpiEventRegisterNotifier()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
